package com.doyoung.appicker.data;

import java.util.ArrayList;
import java.util.List;

import android.content.pm.PackageInfo;
import android.graphics.drawable.Drawable;

public class AppInfo {
	
	private String appName = "";
	private String packageName = "";
	private String versionName = "";
	private int versionCode = 0;
	private Drawable icon;
	
//	private ArrayList<AppInfo> getPackages(){
//		ArrayList<AppInfo> apps = getInstalledApps(false); // false : no system packages
//		
//		return apps;
//	}
	
//	private ArrayList<AppInfo> getInstalledApps(boolean getSysPackages){
//		ArrayList<AppInfo> res = new ArrayList<AppInfo>();        
//	    List<PackageInfo> packs = getPackageManager().getInstalledPackages(0);
//	    for(int i=0;i<packs.size();i++) {
//	        PackageInfo p = packs.get(i);
//	        if ((!getSysPackages) && (p.versionName == null)) {
//	            continue ;
//	        }
//	        AppInfo newInfo = new AppInfo();
//	        newInfo.appName = p.applicationInfo.loadLabel(getPackageManager()).toString();
//	        newInfo.packageName = p.packageName;
//	        newInfo.versionName = p.versionName;
//	        newInfo.versionCode = p.versionCode;
//	        newInfo.icon = p.applicationInfo.loadIcon(getPackageManager());
//	        res.add(newInfo);
//	    }
//	    return res; 
//	}
}
